package wifiunion.com.notice.presenter;

import com.google.gson.reflect.TypeToken;


import java.util.HashMap;

import wifiunion.com.notice.BaseCallBack;
import wifiunion.com.notice.Constants;
import wifiunion.com.notice.HttpUtils;
import wifiunion.com.notice.entity.User;


/**
 * Created by Administrator on 2016/10/19.
 */
public class LoginModel implements LoginDetailContact.Model {


    @Override
    public void loadData(String url, HashMap<String, Object> params, BaseCallBack callBack) {
         HttpUtils.HttpGetRequest_Asyn(Constants.HTTP_URL_GET_LOGIN, params,
                callBack, new TypeToken<User>() {
                }.getType());
    }






    public void loginIcloud(HashMap<String, Object> params, BaseCallBack callBack) {
         HttpUtils.HttpGetRequest_Asyn(Constants.HTTP_URL_GET_ICLOUDLOGIN, params,
                callBack, new TypeToken<Object>() {
                }.getType());
    }

    public void getVerCode(HashMap<String, Object> params, BaseCallBack callBack) {
         HttpUtils.HttpGetRequest_Asyn(Constants.HTTP_URL_GET_VERIFY, params,
                callBack, new TypeToken<Object>() {
                }.getType());
    }

    public void regIcloud(HashMap<String, Object> params, BaseCallBack callBack) {
         HttpUtils.HttpGetRequest_Asyn(Constants.HTTP_URL_GET_ICLOUDREG, params,
                callBack, new TypeToken<Object>() {
                }.getType());
    }




    public void loginSubPlaceRequest(HashMap<String, Object> params, BaseCallBack callBack) {
        HttpUtils.HttpGetRequest_Asyn(Constants.HTTP_URL_GET_LOGIN_SUBPLACE, params,
                callBack, new TypeToken<User>() {
                }.getType());
    }




}
